Developer Documentation
PATH  WebObjects 4.5 Documentation > Getting Started With Direct to Java Client

   

Configuring Widgets

The Assistant's Widgets tab allows you to configure the widgets used to display and manipulate properties (attributes and relationships). For example, you can change the widget that's used to display a particular attribute, and you can set the widget's resizing behavior.

  1. Change the widget for the PlotSummary entity's summary attribute to a text area.

    Select the Widget tab in the Assistant. Set the Task pull-down list to form, the Entity pull-down list to PlotSummary, and the Property pull-down list to summary.

    Set the Widget Type to EOTextAreaController. Save the change, and open a new Movie form window to see the change.

  2. Remove the Summary label.

    The summary Widget label is redundant with the PlotSummary tab label, so you should remove it.

    If you opened a new Movie form window to see the change you made in step Change the widget for the PlotSummary entity's summary attribute to a text area., you first need to restore the Assistant's Widget tab settings. Set the Task to form, the Entity to PlotSummary, and the Property to summary.

    Now set the summary property's "Show Label Component" setting to False. Save the change, and open a new form to see it.

  3. Set sizing information for the summary widget.

    Resize the window so it's much larger than the default size. Notice that the summary widget doesn't resize vertically. To prevent the waste of screen real estate and to display more of the summary upon window resizing, you need to set the widget to resize.

    Restore the Assistant Task, Entity, and Property settings to form, PlotSummary, and summary, respectively. Now set the summary property's "Vertically Resizable" setting to True. Save the change, and open a new form to see it.

  4. Change the widget for the Review entity's review attribute to a text area.

    In the Widget tab of the Assistant, set the Task to form, Entity to Review, and Property to review. Set the Widget Type to EOTextAreaController. Save the change.

  5. Set sizing information for the review widget.

    In a new Movie form window, switch to the Review tab. Resize the window so it's much larger than the default size. Notice that the Review widget doesn't resize vertically. In this window, this behavior is appropriate because the table view above the Review widget does resize to take up the added area.

    However, you might want a larger area in which to display movie reviews. If you set the text area to resize vertically, the widget still won't resize because the table view above it does. So to provide a larger text area, you can set a minimum height.

    Restore the Assistant Task, Entity, and Property settings to form, Review, and review, respectively. Now set the review property's "Minimum Height" setting to 200. Save the change, and open a new form to see it.


© 1999 Apple Computer, Inc. – (Draft. Last updated 05 Jan 00)